<template>
  <div id="app">
    <Nav />
    <router-view></router-view>
  </div>
</template>

<script>
import { mapActions, mapMutations } from 'vuex'
import Nav from './components/Nav'

export default {
  name: 'App',
  components: { Nav },
  mounted () {
    this.getGoodsList()
    // 获取本地存储（购物车信息）
    this.setLocalSession()
  },
  methods: {
    ...mapActions(['getGoodsList']),
    ...mapMutations(['setLocalSession'])
  }
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
</style>
